#include <stdio.h>

int Even(int n);
int Even(int n){
	if (n%2==0)
		return 1;
	else
		return 0;
		
	
	
}

int main() {
	int n,result;
	scanf("%d",&n);
	Even(n);
	result= Even(n);
	printf("%d",result);
	
	return 0;

}



